﻿<!--#include file="h.asp"--><%
'
'	七色虎建站系统
'	网友投稿页面
'	2011.2.1

Sub main
	Dim id,userid,rs,sql,count,pagecount,page,i,pagesize,pagenum,classid,body_,title
	id=getN("id",0)
	userid=user_array(0)
	pagesize=10
	page=getN("page",1)
	hu.title = "用户文章"
	body_ = checkMsg()'信息
	body_ = body_ & "[div=nav]-"&hu.url("?aid=index", "首页")&"-"&hu.url("bbs_user.asp","会员中心")&"-用户文章[/div]"
	If id=0 Or id=userid Then id=userid
	sql="select id,title,hit,smspin,classid from 74hu_article where hu_author='"&id&"'"
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql, hu.db, 1, 1
	If Not rs.eof Then
		count = rs.recordcount
		body_ = body_ & "共"&count&"篇文章<br/>"
		pagecount=(count+pagesize-1)\pagesize
		if page>pagecount then page=pagecount
		pagenum=pagesize*(page-1)*1
		rs.move(pagenum)
		For i=1 To PageSize
			If rs.eof Then Exit For
			title=noubb(getLeft(rs("title"),10))
			If rs("classid")<>0 Then
				body_ = body_ & ""&(pagenum+i)&"."&hu.url("article.asp?id="&rs("id"),title)&"["& rs("smspin") &"回 / "& rs("hit") &"阅]<br/>"
			Else
				body_ = body_ & ""&(pagenum+i)&"."& title &"[未审核]<br/>"
			End If
			rs.movenext
		Next
		body_ = body_ & showPage("bbs_myessay.asp", "id:"&id, page, pagecount)
	Else
		body_ = body_ & "暂时没有文章<br/>"
	End If
	rs.close
	Set rs=Nothing
	hu.body = comUbb(body_) & ""&showImg("essay")&hu.url("bbs_essay.asp","我要投稿")&"<br/>"
End Sub

%>